const cfg = require('../gulpfile');
const path = require('path');
const _ = require('lodash');
const {src, bin} = cfg;

cfg.pub = {
    web: {
        dir: bin.web.dir
    }
};
bin.web.dir = `${bin.dir}/${bin.web.dir}`;

_.each(src, (v, k) => {
    if (k !== 'dir') {
        v.dir = path.join(src.dir, v.dir);
    }
});
src.css.main = path.join(src.css.dir, src.css.main);
//src.app.schema.dir = path.join(src.app.dir, src.app.schema.dir);

const root = path.resolve(__dirname, '..');
bin.web.path = path.join(root, bin.web.dir);
src.web.path = path.join(root, src.web.dir);
src.web.entry = path.join(root, src.web.dir, src.web.main);

module.exports = cfg;
